#include <bits/stdc++.h>

using namespace std;

int cnt,sum;
char aim;
string s;

int main() 
{
	cin>>s;
	int len=s.size();
	string ret=s;
	s=" "+s;
	
	for(int i=1;i<=len;i++)
	{
		if(s[i]=='-') continue;
		if(i==len) 
		{
			aim=s[i];
			break;
		}
		cnt++;
		sum=(sum+cnt*(s[i]-'0'))%11;
	}
	
	if(sum==10&&aim=='X') cout<<"Right"<<endl;
	else if(sum+'0'==aim) cout<<"Right"<<endl;
	else 
	{
		ret.erase(len-1,1);
		ret.push_back(sum==10?'X':sum+'0');
		cout<<ret<<endl;
	}
	return 0;
}
